package com.lmds.sprindemo1.mq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * User: mgm
 * Date: 2019-08-22
 * Time: 11:32
 */

@Controller
@RequestMapping("message")
public class MessageController {
    @Autowired
    private MessageProducter productor;


    @RequestMapping("sendMsg")
    @ResponseBody
    public String sendMsg(String queue, String msg) {
        productor.sendMsg(queue, msg);
        return "发送成功:" + msg;
    }
}
